

function addformstartdate()
{

   
    $("#firstaddform").append('<div id="feature'+rowdiv+'" class="itPlg featureclass">'+dataform['startdate']+"</div>");
    var rownow=rowdiv;

   

    
    
    
$( "#feature"+rownow+' input[name="startdate[]"]' ).datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 1,
dateFormat:'dd/mm/yy',
onClose: function( selectedDate ) {
$( "#feature"+rownow+' input[name="enddate[]"]' ).datepicker( "option", "minDate", selectedDate );
}
});
$( "#feature"+rownow+' input[name="enddate[]"]' ).datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 1,
dateFormat:'dd/mm/yy',
onClose: function( selectedDate ) {
$( "#feature"+rownow+' input[name="startdate[]"]' ).datepicker( "option", "maxDate", selectedDate );
}
});
    
    
    
    
    rowdiv++;

}

function saveformstartdate(id,plugid)
{
var obj={plugid:plugid,startdate:$("#"+id+' input[name="startdate[]"]').val(),enddate:$("#"+id+' input[name="enddate[]"]').val()};

    return obj;
}

function getformstartdate(dataplugin)
{
if(dataplugin.startnewdate!="00/00/0000"&&dataplugin.endnewdate!="00/00/0000")
{
$('.ovlPopLd '+targetdiv+' .ldIt.wrpPmtLd .pmtLd span:eq(0)').html(dataplugin.startnewdate);
$('.ovlPopLd '+targetdiv+' .ldIt.wrpPmtLd .pmtLd span:eq(2)').html(dataplugin.endnewdate);
$('.ovlPopLd '+targetdiv+' .ldIt.wrpPmtLd').show();
}else
{
$('.ovlPopLd '+targetdiv+' .ldIt.wrpPmtLd').hide();

}
var str="";
return str;


}

function editformstartdate(datarow)
{
        addformstartdate();
        var rownow= rowdiv-1;
        if(datarow.startnewdate!="00/00/0000")$('#feature'+rownow+'  input[name="startdate[]"]').val(datarow.startnewdate);
        if(datarow.endnewdate!="00/00/0000")$('#feature'+rownow+'  input[name="enddate[]"]').val(datarow.endnewdate);
    //    $('#feature'+rownow+'  select[name="curid[]"]').val(datarow.curid);

}